#ifndef __SOCKETIO_H__
#define __SOCKETIO_H__

namespace myNameSpace {
class Packet;
class SocketIO {
public:
    explicit SocketIO(int connectFd);

    int recvn(char *buf, int len) const;
    int recvPeek(char *buf, int len) const;
    int readLine(char *buf, int maxLen) const;
    int readPacket(Packet &packet) const;
    int sendn(const char *buf, int len) const;

private:
    int _fd;
};
} // end of namespace myNameSpace

#endif
